#pragma once
#include<windows.h>
#include"DataDef.h"
#include<vector>
#include "ErrorHandler.h"

using namespace std;

class EffectManager
{
public:
	EffectManager(void);
	~EffectManager(void);

	bool loadEffectFile(const LPDIRECT3DDEVICE9 p_dx_Device, const LPCWSTR fileName);
	void getEffectAndHandle(LPD3DXEFFECT &effectIn, D3DXHANDLE &in, const LPCWSTR fileName);
	HRESULT setupEffect(const LPCWSTR fileName);
	const LPD3DXEFFECT getSetEffect() const
	{
		return setEffect;
	}

private:
	std::vector < LPCWSTR > fileNames;
	std::vector < LPD3DXEFFECT > effects;
	std::vector < D3DXHANDLE > effectHandles;

	LPD3DXEFFECT setEffect;
	D3DXHANDLE setHandle;
};
